#include "ktoolpanelwidget.h"
#include "ui_ktoolpanelwidget.h"
#include <QDebug>
#include <QFile>

KToolPanelWidget::KToolPanelWidget(QWidget* parent)
	:QWidget(parent)
	,ui(new Ui::KToolPanelWidget)
{
	ui->setupUi(this);
}

KToolPanelWidget::~KToolPanelWidget()
{
	delete ui;
}

KToolButton* KToolPanelWidget::getBtnMouse() const
{
	return ui->m_pBtnMouse;
}

KToolButton* KToolPanelWidget::getBtnFreeHand() const
{
	return ui->m_pBtnFreeHand;
}

KToolButton* KToolPanelWidget::getBtnLine() const
{
	return ui->m_pBtnLine;
}

KToolButton* KToolPanelWidget::getBtnRect() const
{
	return ui->m_pBtnRect;
}

KToolButton* KToolPanelWidget::getBtnEllipse() const
{
	return ui->m_pBtnEllipse;
}

KToolButton* KToolPanelWidget::getBtnStar() const
{
	return ui->m_pBtnStar;
}

KToolButton* KToolPanelWidget::getBtnText() const
{
	return ui->m_pBtnText;
}

KToolButton* KToolPanelWidget::getBtnZoomIn() const
{
	return ui->m_pBtnZoomIn;
}

KToolButton* KToolPanelWidget::getBtnZoomOut() const
{
	return ui->m_pBtnZoomOut;
}

KToolButton* KToolPanelWidget::getBtnPentagon() const
{
	return ui->m_pBtnPentagon;
}

KToolButton* KToolPanelWidget::getBtnRhombus() const
{
	return ui->m_pBtnRhombus;
}

KToolButton* KToolPanelWidget::getBtnCloud() const
{
	return ui->m_pBtnCloud;
}

KToolButton* KToolPanelWidget::getBtnHeart() const
{
	return ui->m_pBtnHeart;
}

KToolButton* KToolPanelWidget::getBtnHexagon() const
{
	return ui->m_pBtnHexagon;
}

QMap<KShapeType, KToolButton*> KToolPanelWidget::getShapeButtonMap() const
{
	QMap<KShapeType, KToolButton*> map;
	map[KShapeType::MouseShapeType] = ui->m_pBtnMouse;
	map[KShapeType::FreeHandShapeType] = ui->m_pBtnFreeHand;
	map[KShapeType::LineShapeType] = ui->m_pBtnLine;
	map[KShapeType::RectShapeType] = ui->m_pBtnRect;
	map[KShapeType::EllipseShapeType] = ui->m_pBtnEllipse;
	map[KShapeType::StarShapeType] = ui->m_pBtnStar;
	map[KShapeType::TextShapeType] = ui->m_pBtnText;
	map[KShapeType::ZoomInShapeType] = ui->m_pBtnZoomIn;
	map[KShapeType::ZoomOutShapeType] = ui->m_pBtnZoomOut;
	map[KShapeType::PentagonShapeType] = ui->m_pBtnPentagon;
	map[KShapeType::RhombusShapeType] = ui->m_pBtnRhombus;
	map[KShapeType::CloudShapeType] = ui->m_pBtnCloud;
	map[KShapeType::HeartShapeType] = ui->m_pBtnHeart;
	map[KShapeType::HexagonShapeType] = ui->m_pBtnHexagon;
	return map;
}